Teacher Version

Hero Image
Hero Image

Obstacle Detection Failures

Topics Covered

  • Switch Loops

Virtual Robot: ObstacleDetectAttemptsVR.rbg

Physical Robot: ObstacleDetectAttempts.rbg

Check Your Understanding

  1. Why doesn't this program work for Obstacle Detection?
    1. The Forward command should not be set to 50% power
    2. The forward command block has control, and prevents the program from checking sensors or running other blocks until the forward command finishes counting 4 rotations
    3. The program should use the Gyro sensor instead of the Distance sensor
    4. The Forward command should be set to 6 rotations instead of 4
  2. True or False: The repeatUntil block simultaneously and continuouslychecks the left motor rotations, while the blocks inside hold the program flow.
    1. True
    2. False
  3. Why doesn’t this program work for Obstacle Detection?
    1. The repeatUntil Loop block does not check the correct sensor
    2. You cannot have two waitUntil commands in sequence that way
    3. The first waitUntil block should be 'Distance Value greater than 100' and the second waitUntil block should be 'Distance Value less than 100'
    4. The waitUntil blocks prevent program flow from reaching the end of the Loop to check the Motor Encoder
  4. Instead of using a Waiting approach or long movements, the solution you will learn in the next section will involve:
    1. Continuous checking of sensors
    2. Sensor recombination forks
    3. A new multiple-sensor Wait block
    4. A new type of Loop block

ClosedClick here for the Answers

B. The forward command block has control, and prevents the program from checking sensors or running other blocks until the forward command finishes counting 4 rotations.

B. False

D. The waitUntil blocks prevent program flow from reaching the end of the Loop to check the Motor Encoder.

A. Continuous checking of sensors

© 2016 Robomatter, Inc.

Portions of this product are manufactured under license from Carnegie Mellon University.